$(function () {
	
	// 从本地存储获取用户信息
	var userInfo = window.localStorage.getItem("userInfo");
	if(userInfo){
		userInfo = JSON.parse(userInfo);
	}else{
		window.location.href = "login.html";
	}

	$(".user-header img").attr("src",indexUrl+userInfo.icon)
	$(".user-header h3").html(userInfo.name)

	// 退出功能
	$("#quit").click(function(){
		window.localStorage.removeItem("userInfo");
		window.location.href = "login.html";
	})

})